<!DOCTYPE html>
<head>
	<meta charset="utf-8"/>
	<meta name="" content=""/>
	<title>廊坊正康基科技有限公司</title>
	<link rel="stylesheet" type="text/css" href="css/index.css"/>
	<link rel="stylesheet" type="text/css" href="css/detail.css"/>
	<link href="bitbug_favicon.ico" rel="shortcut icon" />
</head>

<body>
	<div class="top" id="top">
		<div class="inner">
			<a href="register.html">注册</a><a href="login.html">登录</a>
		</div>
	</div>
	<header></header>
	<nav>
		
		<ul class="inner" >
			<li><a href="index.html">首页</a></li>
			<li><a href="gongsigonggao.html">公司公告</a></li>
			<li><a href="ershouzhuanrang.html">二手转让</a></li>
			<li><a href="cheliangmaimai.html">车辆买卖</a></li>
			<li><a href="fangwuzushou.html">房屋租售</a></li>
			<li><a href="quanzhizhaopin.html">全职招聘</a></li>
			<li><a href="jianzhizhaopin.html">兼职招聘</a></li>
		</ul>
	</nav>
	<div class="detail inner">
		<h1 id="title"></h1>
		<p class="human">
			<span id="user"></span>
		</p>
		<div class="main_box">
			<p id="text"></p>
			<h5 id="tit">联系电话：</h5>
			<p id="phone"></p>
			<h5 id="tit">联系地址:</h5>
			<p id="add"></p>
		</div>
		
	</div>
	<footer>
		<div class="inner">
			<ul>
			<li class="ac"><a href="index.html">首页</a></li>|
			<li><a href="gongsigonggao.html">公司公告</a></li>|
			<li><a href="ershouzhuanrang.html">二手转让</a></li>|
			<li><a href="cheliangmaimai.html">车辆买卖</a></li>|
			<li><a href="fangwuzushou.html">房屋租售</a></li>|
			<li><a href="quanzhizhaopin.html">全职招聘</a></li>|
			<li><a href="jianzhizhaopin.html">兼职招聘</a></li>|
		</ul>
		<p class="copyright">版权所有©廊坊正康基科技有限公司</p>
		</div>
	</footer>
</body>
<script type="text/javascript" src="js/jquery1111.min.js" ></script>
<script type="text/javascript" src="js/config.js" ></script>
<script>
$(function(){
	var id = GetQueryString('id');
	$.ajax({ 
		url: serverPath + 'searchById?id=' + id,
		type: 'get',
		dataType: 'json',
		success: function(json){
			console.log(json.objs)
			$("#title").html(json.objs.title);
			$("#user").html(json.objs.user);
			$("#text").html(json.objs.text);
			if(json.objs.ophone){ 
				$('#phone').html(json.objs.ophone);
				$('#add').html(json.objs.path)
			}else{
				$('#tit').hide()
			}
			
		},
		error: function(){
			alert('error');
		}
	});
})

function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
     if(r!=null)return  unescape(r[2]); return null;
}
	
	var username=document.cookie.split(";")[0].split("=")[1];  
	console.log(username)
	if(username){
		var username='<a href="javascript:;">恭喜您'+username+',登录成功！</a><a href="delivery.html">免费发布信息</a>'
		$('#top').empty().append(username)
	}else{
		var news='<a id="news" href="login.html">免费发布信息</a>'
		
		$('#top').append(news)
	}
</script>
</html>